#include <cstdio>
#include <iostream>
#include <string>

using ll = long long;

ll n;
std::string s;

int main(){
    #ifdef ONLINE_JUDGE
        freopen("confess.in", "r", stdin);
        freopen("confess.out", "w", stdout);
    #endif

    std::cin>>n;

    for(ll _{0};_<n;_++){
        std::cin>>s;
        ll odd_add_num{}; //奇数+ -> -2
        ll even_sub_num{};//偶数- -> +2
        /*
            奇数->(bin*1)
            偶数->(bin*0)

            不坦白->
                +1
                -1
                ->不论怎样，奇偶性质都会改变

            坦白->
                原本是'+'
                    奇数(*1)->xor 1->*0 -2
                    偶数(*0)->xor 1->*1 0
                原本是'-'
                    奇数(*1)->xor 1->*0 0
                    偶数(*0)->xor 1->*1 +2
                
        */
        ll sum{};
        for(ll i{0};i<s.size();i++){
            if(s[i]=='+'){
                if(i&1){//奇数
                    ++odd_add_num;
                }
                sum++;
            }else{
                if((i&1)==0){ // 偶数
                    even_sub_num++;
                }
                sum--;
            }
        }
        std::cout<<sum<<' ';
        for(ll j{0};j<even_sub_num;j++){
            sum+=2;
            std::cout<<sum<<' ';
        }
        for(ll j{0};j<(s.size()-odd_add_num-even_sub_num);j++){
            std::cout<<sum<<' ';
        }
        for(ll j{0};j<odd_add_num;j++){
            sum-=2;
            std::cout<<sum<<' ';
        }
        std::cout<<'\n';
    }
}